package exception;

public class TryCatchDemo {
    public static void main(String[] args) {
        try {
            System.out.println("程序开始了");
            String len = null;

            System.out.println(len.length());
            len = "abc";
            System.out.println(len.charAt(1));
            System.out.println(Integer.parseInt(len));
            System.out.println("程序结束了！！！！！！！！！！！！！！！！！！！！！");
        } catch (Exception e) {

            System.out.println("这里出现了空指针异常解决了");
            System.out.println("这里出现了下标越界异常解决了");

        }

        System.out.println("程序结束了");
    }
}
